import request from "@/utils/request";


//获取地址
export const getUserAddress=()=>request({
    method:'get',
    url:'/mall/memberReceiveAddress/list'
})



//添加地址
export const addAddress=(data)=>request({
    method:'post',
    url:'/mall/memberReceiveAddress/add',
    data
})


//删除地址
export const deleteAddress=(id)=>request({
    method:'delete',
    url:'/mall/memberReceiveAddress/delete/'+id
})

//修改地址
export const updateAddress=(id,data)=>request({
    method:'post',
    url:`/mall/memberReceiveAddress/update/${id}`,
    data
})

//根据id查询地址
export const getAddressById=(id)=>request({
    method:'get',
    url:'/mall/memberReceiveAddress/getAddr/'+id
})